Integrand size = 26, antiderivative size = 278 \[ \int \frac {(e+f x)^2 \sec (c+d x)}{a+a \sin (c+d x)} \, dx=-\frac {i (e+f x)^2 \arctan \left (e^{i (c+d x)}\right )}{a d}+\frac {f^2 \text {arctanh}(\sin (c+d x))}{a d^3}+\frac {f^2 \log (\cos (c+d x))}{a d^3}+\frac {i f (e+f x) \operatorname {PolyLog}\left (2,-i e^{i (c+d x)}\right )}{a d^2}-\frac {i f (e+f x) \operatorname {PolyLog}\left (2,i e^{i (c+d x)}\right )}{a d^2}-\frac {f^2 \operatorname {PolyLog}\left (3,-i e^{i (c+d x)}\right )}{a d^3}+\frac {f^2 \operatorname {PolyLog}\left (3,i e^{i (c+d x)}\right )}{a d^3}-\frac {f (e+f x) \sec (c+d x)}{a d^2}-\frac {(e+f x)^2 \sec ^2(c+d x)}{2 a d}+\frac {f (e+f x) \tan (c+d x)}{a d^2}+\frac {(e+f x)^2 \sec (c+d x) \tan (c+d x)}{2 a d} \]
-I*(f*x+e)^2*arctan(exp(I*(d*x+c)))/a/d+f^2*arctanh(sin(d*x+c))/a/d^3+f^2* ln(cos(d*x+c))/a/d^3+I*f*(f*x+e)*polylog(2,-I*exp(I*(d*x+c)))/a/d^2-I*f*(f *x+e)*polylog(2,I*exp(I*(d*x+c)))/a/d^2-f^2*polylog(3,-I*exp(I*(d*x+c)))/a /d^3+f^2*polylog(3,I*exp(I*(d*x+c)))/a/d^3-f*(f*x+e)*sec(d*x+c)/a/d^2-1/2* (f*x+e)^2*sec(d*x+c)^2/a/d+f*(f*x+e)*tan(d*x+c)/a/d^2+1/2*(f*x+e)^2*sec(d* x+c)*tan(d*x+c)/a/d
Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(725\) vs. \(2(278)=556\).
Time = 7.87 (sec) , antiderivative size = 725, normalized size of antiderivative = 2.61 \[ \int \frac {(e+f x)^2 \sec (c+d x)}{a+a \sin (c+d x)} \, dx=-\frac {\frac {(e+f x)^3}{\left (-i+e^{i c}\right ) f}+\frac {3 (e+f x)^2 \log \left (1-i e^{-i (c+d x)}\right )}{d}+\frac {6 f \left (i d (e+f x) \operatorname {PolyLog}\left (2,i e^{-i (c+d x)}\right )+f \operatorname {PolyLog}\left (3,i e^{-i (c+d x)}\right )\right )}{d^3}}{6 a}+\frac {x \left (3 e^2+3 e f x+f^2 x^2\right )}{6 a \left (\cos \left (\frac {c}{2}\right )-\sin \left (\frac {c}{2}\right )\right ) \left (\cos \left (\frac {c}{2}\right )+\sin \left (\frac {c}{2}\right )\right )}-\frac {(\cos (c)+i \sin (c)) \left (d^2 e^2 x \cos (c)+4 f^2 x \cos (c)+d^2 e f x^2 \cos (c)+\frac {1}{3} d^2 f^2 x^3 (\cos (c)-i \sin (c))-i d^2 e^2 x \sin (c)-4 i f^2 x \sin (c)-i d^2 e f x^2 \sin (c)+2 e f \operatorname {PolyLog}(2,-i \cos (c+d x)-\sin (c+d x)) (\cos (c)-i (1+\sin (c)))+2 f^2 x \operatorname {PolyLog}(2,-i \cos (c+d x)-\sin (c+d x)) (\cos (c)-i (1+\sin (c)))-2 d e f x \log (1+i \cos (c+d x)+\sin (c+d x)) (\cos (c)-i \sin (c)) (\cos (c)+i (1+\sin (c)))-d f^2 x^2 \log (1+i \cos (c+d x)+\sin (c+d x)) (\cos (c)-i \sin (c)) (\cos (c)+i (1+\sin (c)))-\frac {\left (d^2 e^2+4 f^2\right ) \log (\cos (c+d x)+i (1+\sin (c+d x))) (\cos (c)-i \sin (c)) (\cos (c)+i (1+\sin (c)))}{d}-\frac {2 f^2 \operatorname {PolyLog}(3,-i \cos (c+d x)-\sin (c+d x)) (\cos (c)-i \sin (c)) (\cos (c)+i (1+\sin (c)))}{d}+\left (d^2 e^2+4 f^2\right ) x (i \cos (c)+\sin (c)) (\cos (c)+i (1+\sin (c)))\right )}{2 a d^2 (\cos (c)+i (1+\sin (c)))}-\frac {(e+f x)^2}{2 a d \left (\cos \left (\frac {c}{2}+\frac {d x}{2}\right )+\sin \left (\frac {c}{2}+\frac {d x}{2}\right )\right )^2}+\frac {2 \left (e f \sin \left (\frac {d x}{2}\right )+f^2 x \sin \left (\frac {d x}{2}\right )\right )}{a d^2 \left (\cos \left (\frac {c}{2}\right )+\sin \left (\frac {c}{2}\right )\right ) \left (\cos \left (\frac {c}{2}+\frac {d x}{2}\right )+\sin \left (\frac {c}{2}+\frac {d x}{2}\right )\right )} \]
-1/6*((e + f*x)^3/((-I + E^(I*c))*f) + (3*(e + f*x)^2*Log[1 - I/E^(I*(c + d*x))])/d + (6*f*(I*d*(e + f*x)*PolyLog[2, I/E^(I*(c + d*x))] + f*PolyLog[ 3, I/E^(I*(c + d*x))]))/d^3)/a + (x*(3*e^2 + 3*e*f*x + f^2*x^2))/(6*a*(Cos [c/2] - Sin[c/2])*(Cos[c/2] + Sin[c/2])) - ((Cos[c] + I*Sin[c])*(d^2*e^2*x *Cos[c] + 4*f^2*x*Cos[c] + d^2*e*f*x^2*Cos[c] + (d^2*f^2*x^3*(Cos[c] - I*S in[c]))/3 - I*d^2*e^2*x*Sin[c] - (4*I)*f^2*x*Sin[c] - I*d^2*e*f*x^2*Sin[c] + 2*e*f*PolyLog[2, (-I)*Cos[c + d*x] - Sin[c + d*x]]*(Cos[c] - I*(1 + Sin [c])) + 2*f^2*x*PolyLog[2, (-I)*Cos[c + d*x] - Sin[c + d*x]]*(Cos[c] - I*( 1 + Sin[c])) - 2*d*e*f*x*Log[1 + I*Cos[c + d*x] + Sin[c + d*x]]*(Cos[c] - I*Sin[c])*(Cos[c] + I*(1 + Sin[c])) - d*f^2*x^2*Log[1 + I*Cos[c + d*x] + S in[c + d*x]]*(Cos[c] - I*Sin[c])*(Cos[c] + I*(1 + Sin[c])) - ((d^2*e^2 + 4 *f^2)*Log[Cos[c + d*x] + I*(1 + Sin[c + d*x])]*(Cos[c] - I*Sin[c])*(Cos[c] + I*(1 + Sin[c])))/d - (2*f^2*PolyLog[3, (-I)*Cos[c + d*x] - Sin[c + d*x] ]*(Cos[c] - I*Sin[c])*(Cos[c] + I*(1 + Sin[c])))/d + (d^2*e^2 + 4*f^2)*x*( I*Cos[c] + Sin[c])*(Cos[c] + I*(1 + Sin[c]))))/(2*a*d^2*(Cos[c] + I*(1 + S in[c]))) - (e + f*x)^2/(2*a*d*(Cos[c/2 + (d*x)/2] + Sin[c/2 + (d*x)/2])^2) + (2*(e*f*Sin[(d*x)/2] + f^2*x*Sin[(d*x)/2]))/(a*d^2*(Cos[c/2] + Sin[c/2] )*(Cos[c/2 + (d*x)/2] + Sin[c/2 + (d*x)/2]))
Time = 1.64 (sec) , antiderivative size = 274, normalized size of antiderivative = 0.99, number of steps used = 16, number of rules used = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.577, Rules used = {5042, 3042, 4674, 3042, 4257, 4669, 3011, 2720, 4909, 3042, 4672, 25, 3042, 3956, 7143}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {(e+f x)^2 \sec (c+d x)}{a \sin (c+d x)+a} \, dx\) |
\(\Big \downarrow \) 5042 |
\(\displaystyle \frac {\int (e+f x)^2 \sec ^3(c+d x)dx}{a}-\frac {\int (e+f x)^2 \sec ^2(c+d x) \tan (c+d x)dx}{a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int (e+f x)^2 \csc \left (c+d x+\frac {\pi }{2}\right )^3dx}{a}-\frac {\int (e+f x)^2 \sec ^2(c+d x) \tan (c+d x)dx}{a}\) |
\(\Big \downarrow \) 4674 |
\(\displaystyle \frac {\frac {f^2 \int \sec (c+d x)dx}{d^2}+\frac {1}{2} \int (e+f x)^2 \sec (c+d x)dx-\frac {f (e+f x) \sec (c+d x)}{d^2}+\frac {(e+f x)^2 \tan (c+d x) \sec (c+d x)}{2 d}}{a}-\frac {\int (e+f x)^2 \sec ^2(c+d x) \tan (c+d x)dx}{a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {f^2 \int \csc \left (c+d x+\frac {\pi }{2}\right )dx}{d^2}+\frac {1}{2} \int (e+f x)^2 \csc \left (c+d x+\frac {\pi }{2}\right )dx-\frac {f (e+f x) \sec (c+d x)}{d^2}+\frac {(e+f x)^2 \tan (c+d x) \sec (c+d x)}{2 d}}{a}-\frac {\int (e+f x)^2 \sec ^2(c+d x) \tan (c+d x)dx}{a}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle \frac {\frac {1}{2} \int (e+f x)^2 \csc \left (c+d x+\frac {\pi }{2}\right )dx+\frac {f^2 \text {arctanh}(\sin (c+d x))}{d^3}-\frac {f (e+f x) \sec (c+d x)}{d^2}+\frac {(e+f x)^2 \tan (c+d x) \sec (c+d x)}{2 d}}{a}-\frac {\int (e+f x)^2 \sec ^2(c+d x) \tan (c+d x)dx}{a}\) |
\(\Big \downarrow \) 4669 |
\(\displaystyle -\frac {\int (e+f x)^2 \sec ^2(c+d x) \tan (c+d x)dx}{a}+\frac {\frac {1}{2} \left (-\frac {2 f \int (e+f x) \log \left (1-i e^{i (c+d x)}\right )dx}{d}+\frac {2 f \int (e+f x) \log \left (1+i e^{i (c+d x)}\right )dx}{d}-\frac {2 i (e+f x)^2 \arctan \left (e^{i (c+d x)}\right )}{d}\right )+\frac {f^2 \text {arctanh}(\sin (c+d x))}{d^3}-\frac {f (e+f x) \sec (c+d x)}{d^2}+\frac {(e+f x)^2 \tan (c+d x) \sec (c+d x)}{2 d}}{a}\) |
\(\Big \downarrow \) 3011 |
\(\displaystyle -\frac {\int (e+f x)^2 \sec ^2(c+d x) \tan (c+d x)dx}{a}+\frac {\frac {1}{2} \left (\frac {2 f \left (\frac {i (e+f x) \operatorname {PolyLog}\left (2,-i e^{i (c+d x)}\right )}{d}-\frac {i f \int \operatorname {PolyLog}\left (2,-i e^{i (c+d x)}\right )dx}{d}\right )}{d}-\frac {2 f \left (\frac {i (e+f x) \operatorname {PolyLog}\left (2,i e^{i (c+d x)}\right )}{d}-\frac {i f \int \operatorname {PolyLog}\left (2,i e^{i (c+d x)}\right )dx}{d}\right )}{d}-\frac {2 i (e+f x)^2 \arctan \left (e^{i (c+d x)}\right )}{d}\right )+\frac {f^2 \text {arctanh}(\sin (c+d x))}{d^3}-\frac {f (e+f x) \sec (c+d x)}{d^2}+\frac {(e+f x)^2 \tan (c+d x) \sec (c+d x)}{2 d}}{a}\) |
\(\Big \downarrow \) 2720 |
\(\displaystyle -\frac {\int (e+f x)^2 \sec ^2(c+d x) \tan (c+d x)dx}{a}+\frac {\frac {1}{2} \left (\frac {2 f \left (\frac {i (e+f x) \operatorname {PolyLog}\left (2,-i e^{i (c+d x)}\right )}{d}-\frac {f \int e^{-i (c+d x)} \operatorname {PolyLog}\left (2,-i e^{i (c+d x)}\right )de^{i (c+d x)}}{d^2}\right )}{d}-\frac {2 f \left (\frac {i (e+f x) \operatorname {PolyLog}\left (2,i e^{i (c+d x)}\right )}{d}-\frac {f \int e^{-i (c+d x)} \operatorname {PolyLog}\left (2,i e^{i (c+d x)}\right )de^{i (c+d x)}}{d^2}\right )}{d}-\frac {2 i (e+f x)^2 \arctan \left (e^{i (c+d x)}\right )}{d}\right )+\frac {f^2 \text {arctanh}(\sin (c+d x))}{d^3}-\frac {f (e+f x) \sec (c+d x)}{d^2}+\frac {(e+f x)^2 \tan (c+d x) \sec (c+d x)}{2 d}}{a}\) |
\(\Big \downarrow \) 4909 |
\(\displaystyle -\frac {\frac {(e+f x)^2 \sec ^2(c+d x)}{2 d}-\frac {f \int (e+f x) \sec ^2(c+d x)dx}{d}}{a}+\frac {\frac {1}{2} \left (\frac {2 f \left (\frac {i (e+f x) \operatorname {PolyLog}\left (2,-i e^{i (c+d x)}\right )}{d}-\frac {f \int e^{-i (c+d x)} \operatorname {PolyLog}\left (2,-i e^{i (c+d x)}\right )de^{i (c+d x)}}{d^2}\right )}{d}-\frac {2 f \left (\frac {i (e+f x) \operatorname {PolyLog}\left (2,i e^{i (c+d x)}\right )}{d}-\frac {f \int e^{-i (c+d x)} \operatorname {PolyLog}\left (2,i e^{i (c+d x)}\right )de^{i (c+d x)}}{d^2}\right )}{d}-\frac {2 i (e+f x)^2 \arctan \left (e^{i (c+d x)}\right )}{d}\right )+\frac {f^2 \text {arctanh}(\sin (c+d x))}{d^3}-\frac {f (e+f x) \sec (c+d x)}{d^2}+\frac {(e+f x)^2 \tan (c+d x) \sec (c+d x)}{2 d}}{a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {\frac {(e+f x)^2 \sec ^2(c+d x)}{2 d}-\frac {f \int (e+f x) \csc \left (c+d x+\frac {\pi }{2}\right )^2dx}{d}}{a}+\frac {\frac {1}{2} \left (\frac {2 f \left (\frac {i (e+f x) \operatorname {PolyLog}\left (2,-i e^{i (c+d x)}\right )}{d}-\frac {f \int e^{-i (c+d x)} \operatorname {PolyLog}\left (2,-i e^{i (c+d x)}\right )de^{i (c+d x)}}{d^2}\right )}{d}-\frac {2 f \left (\frac {i (e+f x) \operatorname {PolyLog}\left (2,i e^{i (c+d x)}\right )}{d}-\frac {f \int e^{-i (c+d x)} \operatorname {PolyLog}\left (2,i e^{i (c+d x)}\right )de^{i (c+d x)}}{d^2}\right )}{d}-\frac {2 i (e+f x)^2 \arctan \left (e^{i (c+d x)}\right )}{d}\right )+\frac {f^2 \text {arctanh}(\sin (c+d x))}{d^3}-\frac {f (e+f x) \sec (c+d x)}{d^2}+\frac {(e+f x)^2 \tan (c+d x) \sec (c+d x)}{2 d}}{a}\) |
\(\Big \downarrow \) 4672 |
\(\displaystyle -\frac {\frac {(e+f x)^2 \sec ^2(c+d x)}{2 d}-\frac {f \left (\frac {f \int -\tan (c+d x)dx}{d}+\frac {(e+f x) \tan (c+d x)}{d}\right )}{d}}{a}+\frac {\frac {1}{2} \left (\frac {2 f \left (\frac {i (e+f x) \operatorname {PolyLog}\left (2,-i e^{i (c+d x)}\right )}{d}-\frac {f \int e^{-i (c+d x)} \operatorname {PolyLog}\left (2,-i e^{i (c+d x)}\right )de^{i (c+d x)}}{d^2}\right )}{d}-\frac {2 f \left (\frac {i (e+f x) \operatorname {PolyLog}\left (2,i e^{i (c+d x)}\right )}{d}-\frac {f \int e^{-i (c+d x)} \operatorname {PolyLog}\left (2,i e^{i (c+d x)}\right )de^{i (c+d x)}}{d^2}\right )}{d}-\frac {2 i (e+f x)^2 \arctan \left (e^{i (c+d x)}\right )}{d}\right )+\frac {f^2 \text {arctanh}(\sin (c+d x))}{d^3}-\frac {f (e+f x) \sec (c+d x)}{d^2}+\frac {(e+f x)^2 \tan (c+d x) \sec (c+d x)}{2 d}}{a}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\frac {\frac {(e+f x)^2 \sec ^2(c+d x)}{2 d}-\frac {f \left (\frac {(e+f x) \tan (c+d x)}{d}-\frac {f \int \tan (c+d x)dx}{d}\right )}{d}}{a}+\frac {\frac {1}{2} \left (\frac {2 f \left (\frac {i (e+f x) \operatorname {PolyLog}\left (2,-i e^{i (c+d x)}\right )}{d}-\frac {f \int e^{-i (c+d x)} \operatorname {PolyLog}\left (2,-i e^{i (c+d x)}\right )de^{i (c+d x)}}{d^2}\right )}{d}-\frac {2 f \left (\frac {i (e+f x) \operatorname {PolyLog}\left (2,i e^{i (c+d x)}\right )}{d}-\frac {f \int e^{-i (c+d x)} \operatorname {PolyLog}\left (2,i e^{i (c+d x)}\right )de^{i (c+d x)}}{d^2}\right )}{d}-\frac {2 i (e+f x)^2 \arctan \left (e^{i (c+d x)}\right )}{d}\right )+\frac {f^2 \text {arctanh}(\sin (c+d x))}{d^3}-\frac {f (e+f x) \sec (c+d x)}{d^2}+\frac {(e+f x)^2 \tan (c+d x) \sec (c+d x)}{2 d}}{a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {\frac {(e+f x)^2 \sec ^2(c+d x)}{2 d}-\frac {f \left (\frac {(e+f x) \tan (c+d x)}{d}-\frac {f \int \tan (c+d x)dx}{d}\right )}{d}}{a}+\frac {\frac {1}{2} \left (\frac {2 f \left (\frac {i (e+f x) \operatorname {PolyLog}\left (2,-i e^{i (c+d x)}\right )}{d}-\frac {f \int e^{-i (c+d x)} \operatorname {PolyLog}\left (2,-i e^{i (c+d x)}\right )de^{i (c+d x)}}{d^2}\right )}{d}-\frac {2 f \left (\frac {i (e+f x) \operatorname {PolyLog}\left (2,i e^{i (c+d x)}\right )}{d}-\frac {f \int e^{-i (c+d x)} \operatorname {PolyLog}\left (2,i e^{i (c+d x)}\right )de^{i (c+d x)}}{d^2}\right )}{d}-\frac {2 i (e+f x)^2 \arctan \left (e^{i (c+d x)}\right )}{d}\right )+\frac {f^2 \text {arctanh}(\sin (c+d x))}{d^3}-\frac {f (e+f x) \sec (c+d x)}{d^2}+\frac {(e+f x)^2 \tan (c+d x) \sec (c+d x)}{2 d}}{a}\) |
\(\Big \downarrow \) 3956 |
\(\displaystyle -\frac {\frac {(e+f x)^2 \sec ^2(c+d x)}{2 d}-\frac {f \left (\frac {f \log (\cos (c+d x))}{d^2}+\frac {(e+f x) \tan (c+d x)}{d}\right )}{d}}{a}+\frac {\frac {1}{2} \left (\frac {2 f \left (\frac {i (e+f x) \operatorname {PolyLog}\left (2,-i e^{i (c+d x)}\right )}{d}-\frac {f \int e^{-i (c+d x)} \operatorname {PolyLog}\left (2,-i e^{i (c+d x)}\right )de^{i (c+d x)}}{d^2}\right )}{d}-\frac {2 f \left (\frac {i (e+f x) \operatorname {PolyLog}\left (2,i e^{i (c+d x)}\right )}{d}-\frac {f \int e^{-i (c+d x)} \operatorname {PolyLog}\left (2,i e^{i (c+d x)}\right )de^{i (c+d x)}}{d^2}\right )}{d}-\frac {2 i (e+f x)^2 \arctan \left (e^{i (c+d x)}\right )}{d}\right )+\frac {f^2 \text {arctanh}(\sin (c+d x))}{d^3}-\frac {f (e+f x) \sec (c+d x)}{d^2}+\frac {(e+f x)^2 \tan (c+d x) \sec (c+d x)}{2 d}}{a}\) |
\(\Big \downarrow \) 7143 |
\(\displaystyle -\frac {\frac {(e+f x)^2 \sec ^2(c+d x)}{2 d}-\frac {f \left (\frac {f \log (\cos (c+d x))}{d^2}+\frac {(e+f x) \tan (c+d x)}{d}\right )}{d}}{a}+\frac {\frac {1}{2} \left (-\frac {2 i (e+f x)^2 \arctan \left (e^{i (c+d x)}\right )}{d}+\frac {2 f \left (\frac {i (e+f x) \operatorname {PolyLog}\left (2,-i e^{i (c+d x)}\right )}{d}-\frac {f \operatorname {PolyLog}\left (3,-i e^{i (c+d x)}\right )}{d^2}\right )}{d}-\frac {2 f \left (\frac {i (e+f x) \operatorname {PolyLog}\left (2,i e^{i (c+d x)}\right )}{d}-\frac {f \operatorname {PolyLog}\left (3,i e^{i (c+d x)}\right )}{d^2}\right )}{d}\right )+\frac {f^2 \text {arctanh}(\sin (c+d x))}{d^3}-\frac {f (e+f x) \sec (c+d x)}{d^2}+\frac {(e+f x)^2 \tan (c+d x) \sec (c+d x)}{2 d}}{a}\) |
((f^2*ArcTanh[Sin[c + d*x]])/d^3 + (((-2*I)*(e + f*x)^2*ArcTan[E^(I*(c + d *x))])/d + (2*f*((I*(e + f*x)*PolyLog[2, (-I)*E^(I*(c + d*x))])/d - (f*Pol yLog[3, (-I)*E^(I*(c + d*x))])/d^2))/d - (2*f*((I*(e + f*x)*PolyLog[2, I*E ^(I*(c + d*x))])/d - (f*PolyLog[3, I*E^(I*(c + d*x))])/d^2))/d)/2 - (f*(e + f*x)*Sec[c + d*x])/d^2 + ((e + f*x)^2*Sec[c + d*x]*Tan[c + d*x])/(2*d))/ a - (((e + f*x)^2*Sec[c + d*x]^2)/(2*d) - (f*((f*Log[Cos[c + d*x]])/d^2 + ((e + f*x)*Tan[c + d*x])/d))/d)/a
3.3.70.3.1 Defintions of rubi rules used
Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Simp[v/D[v, x] Subst[Int[FunctionOfExponentialFunction[u, x]/x, x], x, v], x]] /; Funct ionOfExponentialQ[u, x] && !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; FreeQ [{a, m, n}, x] && IntegerQ[m*n]] && !MatchQ[u, E^((c_.)*((a_.) + (b_.)*x)) *(F_)[v_] /; FreeQ[{a, b, c}, x] && InverseFunctionQ[F[x]]]
Int[Log[1 + (e_.)*((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.)]*((f_.) + (g_.) *(x_))^(m_.), x_Symbol] :> Simp[(-(f + g*x)^m)*(PolyLog[2, (-e)*(F^(c*(a + b*x)))^n]/(b*c*n*Log[F])), x] + Simp[g*(m/(b*c*n*Log[F])) Int[(f + g*x)^( m - 1)*PolyLog[2, (-e)*(F^(c*(a + b*x)))^n], x], x] /; FreeQ[{F, a, b, c, e , f, g, n}, x] && GtQ[m, 0]
Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Log[RemoveContent[Cos[c + d *x], x]]/d, x] /; FreeQ[{c, d}, x]
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Int[csc[(e_.) + Pi*(k_.) + (f_.)*(x_)]*((c_.) + (d_.)*(x_))^(m_.), x_Symbol ] :> Simp[-2*(c + d*x)^m*(ArcTanh[E^(I*k*Pi)*E^(I*(e + f*x))]/f), x] + (-Si mp[d*(m/f) Int[(c + d*x)^(m - 1)*Log[1 - E^(I*k*Pi)*E^(I*(e + f*x))], x], x] + Simp[d*(m/f) Int[(c + d*x)^(m - 1)*Log[1 + E^(I*k*Pi)*E^(I*(e + f*x ))], x], x]) /; FreeQ[{c, d, e, f}, x] && IntegerQ[2*k] && IGtQ[m, 0]
Int[csc[(e_.) + (f_.)*(x_)]^2*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp [(-(c + d*x)^m)*(Cot[e + f*x]/f), x] + Simp[d*(m/f) Int[(c + d*x)^(m - 1) *Cot[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(n_)*((c_.) + (d_.)*(x_))^(m_), x_Symbo l] :> Simp[(-b^2)*(c + d*x)^m*Cot[e + f*x]*((b*Csc[e + f*x])^(n - 2)/(f*(n - 1))), x] + (-Simp[b^2*d*m*(c + d*x)^(m - 1)*((b*Csc[e + f*x])^(n - 2)/(f^ 2*(n - 1)*(n - 2))), x] + Simp[b^2*d^2*m*((m - 1)/(f^2*(n - 1)*(n - 2))) Int[(c + d*x)^(m - 2)*(b*Csc[e + f*x])^(n - 2), x], x] + Simp[b^2*((n - 2)/ (n - 1)) Int[(c + d*x)^m*(b*Csc[e + f*x])^(n - 2), x], x]) /; FreeQ[{b, c , d, e, f}, x] && GtQ[n, 1] && NeQ[n, 2] && GtQ[m, 1]
Int[((c_.) + (d_.)*(x_))^(m_.)*Sec[(a_.) + (b_.)*(x_)]^(n_.)*Tan[(a_.) + (b _.)*(x_)]^(p_.), x_Symbol] :> Simp[(c + d*x)^m*(Sec[a + b*x]^n/(b*n)), x] - Simp[d*(m/(b*n)) Int[(c + d*x)^(m - 1)*Sec[a + b*x]^n, x], x] /; FreeQ[{ a, b, c, d, n}, x] && EqQ[p, 1] && GtQ[m, 0]
Int[(((e_.) + (f_.)*(x_))^(m_.)*Sec[(c_.) + (d_.)*(x_)]^(n_.))/((a_) + (b_. )*Sin[(c_.) + (d_.)*(x_)]), x_Symbol] :> Simp[1/a Int[(e + f*x)^m*Sec[c + d*x]^(n + 2), x], x] - Simp[1/b Int[(e + f*x)^m*Sec[c + d*x]^(n + 1)*Tan [c + d*x], x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && IGtQ[m, 0] && EqQ[a ^2 - b^2, 0]
Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_S ymbol] :> Simp[PolyLog[n + 1, c*(a + b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d , e, n, p}, x] && EqQ[b*d, a*e]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 616 vs. \(2 (257 ) = 514\).
Time = 0.41 (sec) , antiderivative size = 617, normalized size of antiderivative = 2.22
method | result | size |
risch | \(-\frac {i e^{2} \arctan \left ({\mathrm e}^{i \left (d x +c \right )}\right )}{a d}+\frac {f^{2} \ln \left (1-i {\mathrm e}^{i \left (d x +c \right )}\right ) x^{2}}{2 d a}+\frac {e f \ln \left (1-i {\mathrm e}^{i \left (d x +c \right )}\right ) x}{d a}-\frac {\ln \left (1+i {\mathrm e}^{i \left (d x +c \right )}\right ) f^{2} x^{2}}{2 a d}+\frac {e f \ln \left (1-i {\mathrm e}^{i \left (d x +c \right )}\right ) c}{d^{2} a}-\frac {2 i f^{2} \arctan \left ({\mathrm e}^{i \left (d x +c \right )}\right )}{a \,d^{3}}+\frac {2 i e f c \arctan \left ({\mathrm e}^{i \left (d x +c \right )}\right )}{a \,d^{2}}+\frac {i e f \,\operatorname {Li}_{2}\left (-i {\mathrm e}^{i \left (d x +c \right )}\right )}{a \,d^{2}}-\frac {f^{2} \operatorname {Li}_{3}\left (-i {\mathrm e}^{i \left (d x +c \right )}\right )}{a \,d^{3}}-\frac {\ln \left (1+i {\mathrm e}^{i \left (d x +c \right )}\right ) e f x}{a d}+\frac {f^{2} \ln \left (1+{\mathrm e}^{2 i \left (d x +c \right )}\right )}{a \,d^{3}}-\frac {c^{2} f^{2} \ln \left (1-i {\mathrm e}^{i \left (d x +c \right )}\right )}{2 d^{3} a}-\frac {2 f^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}\right )}{a \,d^{3}}-\frac {\ln \left (1+i {\mathrm e}^{i \left (d x +c \right )}\right ) c e f}{a \,d^{2}}-\frac {i f^{2} c^{2} \arctan \left ({\mathrm e}^{i \left (d x +c \right )}\right )}{a \,d^{3}}+\frac {f^{2} \ln \left (1+i {\mathrm e}^{i \left (d x +c \right )}\right ) c^{2}}{2 a \,d^{3}}-\frac {i f^{2} \operatorname {Li}_{2}\left (i {\mathrm e}^{i \left (d x +c \right )}\right ) x}{a \,d^{2}}+\frac {f^{2} \operatorname {Li}_{3}\left (i {\mathrm e}^{i \left (d x +c \right )}\right )}{a \,d^{3}}-\frac {i \left (d \,{\mathrm e}^{i \left (d x +c \right )} f^{2} x^{2}+2 d \,{\mathrm e}^{i \left (d x +c \right )} e f x +d \,{\mathrm e}^{i \left (d x +c \right )} e^{2}+2 f^{2} x -2 i f^{2} x \,{\mathrm e}^{i \left (d x +c \right )}+2 e f -2 i e f \,{\mathrm e}^{i \left (d x +c \right )}\right )}{d^{2} \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )^{2} a}+\frac {i f^{2} \operatorname {Li}_{2}\left (-i {\mathrm e}^{i \left (d x +c \right )}\right ) x}{a \,d^{2}}-\frac {i e f \,\operatorname {Li}_{2}\left (i {\mathrm e}^{i \left (d x +c \right )}\right )}{a \,d^{2}}\) | \(617\) |
-I/a/d*e^2*arctan(exp(I*(d*x+c)))+1/2/d/a*f^2*ln(1-I*exp(I*(d*x+c)))*x^2+1 /d/a*e*f*ln(1-I*exp(I*(d*x+c)))*x-1/2/a/d*ln(1+I*exp(I*(d*x+c)))*f^2*x^2+1 /d^2/a*e*f*ln(1-I*exp(I*(d*x+c)))*c-2*I/a/d^3*f^2*arctan(exp(I*(d*x+c)))+2 *I/a/d^2*e*f*c*arctan(exp(I*(d*x+c)))+I/a/d^2*e*f*polylog(2,-I*exp(I*(d*x+ c)))-f^2*polylog(3,-I*exp(I*(d*x+c)))/a/d^3-1/a/d*ln(1+I*exp(I*(d*x+c)))*e *f*x+1/a/d^3*f^2*ln(1+exp(2*I*(d*x+c)))-1/2/d^3/a*c^2*f^2*ln(1-I*exp(I*(d* x+c)))-2/a/d^3*f^2*ln(exp(I*(d*x+c)))-1/a/d^2*ln(1+I*exp(I*(d*x+c)))*c*e*f -I/a/d^3*f^2*c^2*arctan(exp(I*(d*x+c)))+1/2/a/d^3*f^2*ln(1+I*exp(I*(d*x+c) ))*c^2-I/a/d^2*f^2*polylog(2,I*exp(I*(d*x+c)))*x+f^2*polylog(3,I*exp(I*(d* x+c)))/a/d^3-I*(d*exp(I*(d*x+c))*f^2*x^2+2*d*exp(I*(d*x+c))*e*f*x+d*exp(I* (d*x+c))*e^2+2*f^2*x-2*I*f^2*x*exp(I*(d*x+c))+2*e*f-2*I*e*f*exp(I*(d*x+c)) )/d^2/(exp(I*(d*x+c))+I)^2/a+I/a/d^2*f^2*polylog(2,-I*exp(I*(d*x+c)))*x-I/ a/d^2*e*f*polylog(2,I*exp(I*(d*x+c)))
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1064 vs. \(2 (248) = 496\).
Time = 0.33 (sec) , antiderivative size = 1064, normalized size of antiderivative = 3.83 \[ \int \frac {(e+f x)^2 \sec (c+d x)}{a+a \sin (c+d x)} \, dx=\text {Too large to display} \]
-1/4*(2*d^2*f^2*x^2 + 4*d^2*e*f*x + 2*d^2*e^2 + 4*(d*f^2*x + d*e*f)*cos(d* x + c) + 2*(I*d*f^2*x + I*d*e*f + (I*d*f^2*x + I*d*e*f)*sin(d*x + c))*dilo g(I*cos(d*x + c) + sin(d*x + c)) + 2*(I*d*f^2*x + I*d*e*f + (I*d*f^2*x + I *d*e*f)*sin(d*x + c))*dilog(I*cos(d*x + c) - sin(d*x + c)) + 2*(-I*d*f^2*x - I*d*e*f + (-I*d*f^2*x - I*d*e*f)*sin(d*x + c))*dilog(-I*cos(d*x + c) + sin(d*x + c)) + 2*(-I*d*f^2*x - I*d*e*f + (-I*d*f^2*x - I*d*e*f)*sin(d*x + c))*dilog(-I*cos(d*x + c) - sin(d*x + c)) - (d^2*e^2 - 2*c*d*e*f + (c^2 + 4)*f^2 + (d^2*e^2 - 2*c*d*e*f + (c^2 + 4)*f^2)*sin(d*x + c))*log(cos(d*x + c) + I*sin(d*x + c) + I) + (d^2*e^2 - 2*c*d*e*f + c^2*f^2 + (d^2*e^2 - 2 *c*d*e*f + c^2*f^2)*sin(d*x + c))*log(cos(d*x + c) - I*sin(d*x + c) + I) - (d^2*f^2*x^2 + 2*d^2*e*f*x + 2*c*d*e*f - c^2*f^2 + (d^2*f^2*x^2 + 2*d^2*e *f*x + 2*c*d*e*f - c^2*f^2)*sin(d*x + c))*log(I*cos(d*x + c) + sin(d*x + c ) + 1) + (d^2*f^2*x^2 + 2*d^2*e*f*x + 2*c*d*e*f - c^2*f^2 + (d^2*f^2*x^2 + 2*d^2*e*f*x + 2*c*d*e*f - c^2*f^2)*sin(d*x + c))*log(I*cos(d*x + c) - sin (d*x + c) + 1) - (d^2*f^2*x^2 + 2*d^2*e*f*x + 2*c*d*e*f - c^2*f^2 + (d^2*f ^2*x^2 + 2*d^2*e*f*x + 2*c*d*e*f - c^2*f^2)*sin(d*x + c))*log(-I*cos(d*x + c) + sin(d*x + c) + 1) + (d^2*f^2*x^2 + 2*d^2*e*f*x + 2*c*d*e*f - c^2*f^2 + (d^2*f^2*x^2 + 2*d^2*e*f*x + 2*c*d*e*f - c^2*f^2)*sin(d*x + c))*log(-I* cos(d*x + c) - sin(d*x + c) + 1) - (d^2*e^2 - 2*c*d*e*f + (c^2 + 4)*f^2 + (d^2*e^2 - 2*c*d*e*f + (c^2 + 4)*f^2)*sin(d*x + c))*log(-cos(d*x + c) +...
\[ \int \frac {(e+f x)^2 \sec (c+d x)}{a+a \sin (c+d x)} \, dx=\frac {\int \frac {e^{2} \sec {\left (c + d x \right )}}{\sin {\left (c + d x \right )} + 1}\, dx + \int \frac {f^{2} x^{2} \sec {\left (c + d x \right )}}{\sin {\left (c + d x \right )} + 1}\, dx + \int \frac {2 e f x \sec {\left (c + d x \right )}}{\sin {\left (c + d x \right )} + 1}\, dx}{a} \]
(Integral(e**2*sec(c + d*x)/(sin(c + d*x) + 1), x) + Integral(f**2*x**2*se c(c + d*x)/(sin(c + d*x) + 1), x) + Integral(2*e*f*x*sec(c + d*x)/(sin(c + d*x) + 1), x))/a
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1932 vs. \(2 (248) = 496\).
Time = 0.47 (sec) , antiderivative size = 1932, normalized size of antiderivative = 6.95 \[ \int \frac {(e+f x)^2 \sec (c+d x)}{a+a \sin (c+d x)} \, dx=\text {Too large to display} \]
1/4*(2*c*e*f*(2/(a*d*sin(d*x + c) + a*d) - log(sin(d*x + c) + 1)/(a*d) + l og(sin(d*x + c) - 1)/(a*d)) + e^2*(log(sin(d*x + c) + 1)/a - log(sin(d*x + c) - 1)/a - 2/(a*sin(d*x + c) + a)) - 4*(8*(d*x + c)*f^2*cos(2*d*x + 2*c) + 8*I*(d*x + c)*f^2*sin(2*d*x + 2*c) + 8*d*e*f - 8*c*f^2 - 2*((c^2 + 4)*f ^2*cos(2*d*x + 2*c) - 2*(-I*c^2 - 4*I)*f^2*cos(d*x + c) - (-I*c^2 - 4*I)*f ^2*sin(2*d*x + 2*c) - 2*(c^2 + 4)*f^2*sin(d*x + c) - (c^2 + 4)*f^2)*arctan 2(sin(d*x + c) + 1, cos(d*x + c)) + 2*(c^2*f^2*cos(2*d*x + 2*c) + 2*I*c^2* f^2*cos(d*x + c) + I*c^2*f^2*sin(2*d*x + 2*c) - 2*c^2*f^2*sin(d*x + c) - c ^2*f^2)*arctan2(sin(d*x + c) - 1, cos(d*x + c)) - 2*((d*x + c)^2*f^2 + 2*( d*e*f - c*f^2)*(d*x + c) - ((d*x + c)^2*f^2 + 2*(d*e*f - c*f^2)*(d*x + c)) *cos(2*d*x + 2*c) - 2*(I*(d*x + c)^2*f^2 + 2*(I*d*e*f - I*c*f^2)*(d*x + c) )*cos(d*x + c) - (I*(d*x + c)^2*f^2 + 2*(I*d*e*f - I*c*f^2)*(d*x + c))*sin (2*d*x + 2*c) + 2*((d*x + c)^2*f^2 + 2*(d*e*f - c*f^2)*(d*x + c))*sin(d*x + c))*arctan2(cos(d*x + c), sin(d*x + c) + 1) - 2*((d*x + c)^2*f^2 + 2*(d* e*f - c*f^2)*(d*x + c) - ((d*x + c)^2*f^2 + 2*(d*e*f - c*f^2)*(d*x + c))*c os(2*d*x + 2*c) - 2*(I*(d*x + c)^2*f^2 + 2*(I*d*e*f - I*c*f^2)*(d*x + c))* cos(d*x + c) - (I*(d*x + c)^2*f^2 + 2*(I*d*e*f - I*c*f^2)*(d*x + c))*sin(2 *d*x + 2*c) + 2*((d*x + c)^2*f^2 + 2*(d*e*f - c*f^2)*(d*x + c))*sin(d*x + c))*arctan2(cos(d*x + c), -sin(d*x + c) + 1) + 4*((d*x + c)^2*f^2 - 2*I*d* e*f + (c^2 + 2*I*c)*f^2 + 2*(d*e*f - (c - I)*f^2)*(d*x + c))*cos(d*x + ...
\[ \int \frac {(e+f x)^2 \sec (c+d x)}{a+a \sin (c+d x)} \, dx=\int { \frac {{\left (f x + e\right )}^{2} \sec \left (d x + c\right )}{a \sin \left (d x + c\right ) + a} \,d x } \]
Timed out. \[ \int \frac {(e+f x)^2 \sec (c+d x)}{a+a \sin (c+d x)} \, dx=\text {Hanged} \]